/**
 * 
 */
package com.xbang.attendance.entity.system;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 * 菜单
 * 
 * @author dev.zhang
 */
@Entity
public class Menu implements Serializable {

	private static final long serialVersionUID = 3453114998976750978L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Integer id;

	/** 菜单编码 */
	private String code;

	/** 菜单名称 */
	private String name;

	/** 菜单URL地址 */
	private String url;

	/** 菜单顺序 */
	private int menuIndex;

	/** 描述信息 */
	private String description;

	/** 图片地址 */
	private String imagePath;

	/** 父级菜单 */
	@ManyToOne(fetch = FetchType.EAGER)
	private Menu parent;

	/** 是否禁用 */
	private boolean disabled;

	/**
	 * The default constructor
	 */
	public Menu() {

	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return the parent
	 */
	public Menu getParent() {
		return parent;
	}

	/**
	 * @return the disabled
	 */
	public boolean isDisabled() {
		return disabled;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @param url
	 *            the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @param parent
	 *            the parent to set
	 */
	public void setParent(Menu parent) {
		this.parent = parent;
	}

	/**
	 * @param disabled
	 *            the disabled to set
	 */
	public void setDisabled(boolean disabled) {
		this.disabled = disabled;
	}

	/**
	 * @return the imageURL
	 */
	public String getImagePath() {
		return imagePath;
	}

	/**
	 * @param imagePath
	 *            the imageURL to set
	 */
	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}

	/**
	 * @return the menuIndex
	 */
	public int getMenuIndex() {
		return menuIndex;
	}

	/**
	 * @param menuIndex
	 *            the menuIndex to set
	 */
	public void setMenuIndex(int menuIndex) {
		this.menuIndex = menuIndex;
	}

}
